$('#butt').on('click',function () {
    var ss=new Object();
    ss.course_name=window.document.getElementById("docname").value;
    ss.course_dir=window.document.getElementById("course").value;
    ss.doc_url=window.document.getElementById("url").value;
    ss.nandu=window.document.getElementById("nandu").value;
    $.ajax
    ({
        type:'POST',
        dataType:'json',
        contentType: "application/json; charset=utf-8",
        url:contextPath+"new/doc",
        data:JSON.stringify(ss),
        success:function (data) {
            alert(data.message)
            openurl('documentQuery.html');

        },
        error:function () {
            alert("增加失败");
        }
    })
});
function openurl(url) {
    var rframe = parent.document.getElementById("rightFrame");
    rframe.src = url;
}